import java.util.concurrent.*;

/**
 * @Author: 赵勇镔
 * @Time: 2021/5/20 9:50
 * @Description:
 */
public class CompletableFutureDemo {
    public static void main(String[] args) throws Exception {

        ThreadPoolExecutor threadPoolExecutor = new
                ThreadPoolExecutor(5,10,1, TimeUnit.MINUTES,
                new ArrayBlockingQueue<>(10));

        threadPoolExecutor.execute(() -> {
            System.out.println(Thread.currentThread().getName());
        });
        System.out.println(Thread.currentThread().getName());
    }
}

class MyCallable implements Callable{
    @Override
    public Object call() throws Exception {
        System.out.println(Thread.currentThread().getName());
        return "MyCallable返回值";
    }
}


class MyThread extends Thread{
    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName());
    }
}